package cn.sccdlg.spring5.service.impl;

import cn.sccdlg.spring5.service.AccountService;

import java.util.Date;

/**
 * @author RaoShuang
 * @emil 991207823@qq.com
 * @date 2020/10/18 10:31
 * 账户的业务层实现类
 * set注入属性
 */
public class AccountServiceImpl2 implements AccountService {

    /** 如果是经常变化的数据，并不适用于注入的方式*/
    private String name;
    private Integer age;
    private Date birthday;

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    @Override
    public void saveAccount() {
        System.out.println("service中的saveAccount方法执行了。。。");
        System.out.println("name=" + name + ",age=" + age + ",birthday=" + birthday);
    }
}
